package com.qdlc.p2p.common.enums;

/**
 * 用户卡片状态
 *
 * @author Kaiju Zhao
 * @version V1.0.0
 * @date 2016-05-10
 */
public enum EnumUserCardStatus {

    STATUS_NO_USE(0, "未使用"),
    STATUS_USE(1, "已使用"),
    STATUS_EXPIRED(2, "已过期"),
    STATUS_INVALID(3, "无效");

    int status;
    String name;

    EnumUserCardStatus(int status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getName(int status) {
        for (EnumUserCardStatus entry : EnumUserCardStatus.values()) {
            if (entry.status == status) {
                return entry.name;
            }
        }
        return "";
    }

    public int getStatus() {
        return status;
    }

    public String getName() {
        return name;
    }

}
